import {
	observer
} from 'mobx-react';

@observer
export default class CollapseForm extends React.Component {
	constructor(props) {
		super(props);
	}

	render() {
		const {
			form,
			onFormChange
		} = this.props;

		const searchGroupProps = {
			col: 1,
			center: true
		};

		const comProps = {};

		if (onFormChange) {
			Object.assign(comProps, {
				onChange: onFormChange
			});
		}

		return (
			<div>
				{
					form.render(searchGroupProps,comProps)
				}
			</div>
		);
	}
}